package com.ss.android.article.browser.download;

import android.support.annotation.NonNull;

import com.a.a.NightMode;
import com.a.a.u;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

final class k implements NightMode {
    private final DownloadTaskManager a;

    k(DownloadTaskManager arg1) {
        this.a = arg1;
    }

    public final void f(@NonNull Object arg6) {
        List v0 = DownloadTaskManager.a(this.a).queryUnfinishedDownloadTask();
        ArrayList v1 = new ArrayList();
        ArrayList v2 = new ArrayList(DownloadTaskManager.b(this.a).keySet());
        Iterator v3 = v0.iterator();
        while (v3.hasNext()) {
            Object v0_1 = v3.next();
            int v4 = ((List) v2).indexOf(v0_1);
            if (v4 >= 0) {
                ((List) v1).add(((List) v2).get(v4));
                continue;
            }

            ((List) v1).add(v0_1);
        }

        ((u) arg6).onItem(v1);
    }
}

